<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>课程列表</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/xadmin.css">
        <link rel="stylesheet" href="./lib/layui/css/layui.css" media="all">
        <script src="./lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="./js/xadmin.js"></script>
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">
                            <a class="layui-btn"  onclick="location.reload()" title="刷新">
                                <i class="layui-icon layui-icon-refresh"></i>刷新</a>
                        </div>
                        <div class="layui-card-body layui-table-body layui-table-main">

                            <table class="layui-table layui-form">
                                <thead>
                                  <tr>
                                    <th>课程ID</th>
                                    <th>课程名称</th>
                                    <th>属性</th>
                                    <th>限选人数</th>
                                    <th>余量</th>
                                    <th>操作</th>
                                  </tr>
                                </thead>
                                <tbody>
                                <tr th:each="courseList:${#request.getAttribute('courseList')}" th:object="${courseList}">
                                    <!--<form>-->
                                    <!--<input type="hidden" name="username" th:value="${session.user.getUsername()}">
                                    <input type="hidden" name="courseId" th:value="*{id}">-->
                                    <td th:text="*{id}">未知</td>
                                    <td th:text="*{name}">未知</td>
                                    <td th:text="*{property.getValue()}">未知</td>
                                    <td th:text="*{amount}">未知</td>
                                    <td th:text="*{rest}">未知</td>
                                    <td class="td-manage">
                                        <input type="hidden" id="username" th:value="${session.user.username}">
                                        <input type="hidden" name="courseId"  id="courseId" th:value="*{id}"/>
                                        <a title="选课" class="layui-btn" th:onclick="select_course()">
                                            <i class="layui-icon">&#xe61f;</i>选课
                                        </a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div> 
    </body>
<script>
      //location.reload();
      //$(obj).parents("tr").remove();
</script>


</html>